package com.innerBean;

import com.alibaba.fastjson.JSON;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author lxh
 * @create 2019-04-04 14:43
 * @desc
 **/
public class App {

    /*
        内部bean注入

     */
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("Spring-innerBean.xml");
        Customer custommer = (Customer) ac.getBean("customer");
        String consumer = JSON.toJSONString(custommer);
        System.out.println(consumer);
    }
}
